<div id="searchAds" class="span-17 last shadow">
	<h1>Rechercher votre bonheur parmis nos bonnes affaires ...</h1>
	<div class="span-9"  style="float: left;">
		<?php echo form_tag('@homepage', 'id=searchForm')?>	
		<?php echo $searchForm; ?>
		<!--<input type="image" src="../images/rechercher.png" class="btn_blue recherche"> -->
                    <input type="submit" value="Rechercher" class="right_Btn btn_green" />
		</form>
	</div>
	<div class="span-8 last" style="float: right;">
              <?php include_component('static', 'gmaps') ?>
	</div>
</div>


<div id="bonplan" class="span-8 shadow">
	<h2>Nos Coups de Coeur</h2>
	<?php include_component('ads', 'bonplan')?>
</div>

<div id="lastAds" class="span-8 last shadow">
	<h2>Dernières Annonces</h2>
	<?php include_component('ads', 'lastAds')?>
</div>

<?php echo javascript_tag(); ?>
    // selection gmap
    jQuery('#search_town_id').change( function(){
         updateMapsByTownId( $(this).val() );
    })
    
    // selection les sous-categories
    function selectSubCategories(category){
        var s_url = "<?php echo url_for('@sub-categories?slug=subcategories&cat_id=') ?>" + category;
        $.ajax({
                    type: "POST",
                    url: s_url,
                    success: function(response){
                       if(response){
                            $('#search_subcategory_id').html(response);
                        }
                    }
        });
    }
    
<?php echo end_javascript_tag();  ?>